package com.party.service;

import com.party.entity.DataDictionary;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据字典 服务类
 * </p>
 *
 * @author drinkcode
 * @since 2023-04-10
 */
public interface DataDictionaryService extends IService<DataDictionary> {
    List<DataDictionary> queryListIndex();

    List<DataDictionary> queryListById(Long id);

    List<DataDictionary> queryListByName(String name);

    List<DataDictionary> queryListByCode(String code);

    boolean addDataDictionaryA(DataDictionary dataDictionary);

    boolean updateDataDictionaryA(DataDictionary dataDictionary);

    boolean delDataDictionaryA(Long id);

    boolean addDataDictionaryB(DataDictionary dataDictionary);

    boolean updateDataDictionaryB(DataDictionary dataDictionary);

    boolean delDataDictionaryB(Long id);

    //内部通用方法：根据code 查询字典的map(没有字典值不报错，返回空map)
    Map<String,String> getMapByDictionaryCode(String dictionaryCode);
}
